import dayjs from 'dayjs'

export function dayTextFormat(date) {
  const dayTexts = {
    1: '周一',
    2: '周二',
    3: '周三',
    4: '周四',
    5: '周五',
    6: '周六',
    0: '周日'
  }
  return date ? dayTexts[dayjs(date).day()] : dayTexts[dayjs().day()]
}
